package com.zeng.nicecore.config;

import com.zeng.nicecore.exception.GlobalExceptionResolver;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

public class ExceptionConfig {

    @Bean
    @ConditionalOnExpression("${core.exception.open:true}")
    public GlobalExceptionResolver globalExceptionResolver() {
        return new GlobalExceptionResolver();
    }

}
